package cn.gztang.exception;

/**
 * @author GaoFeng2017
 * @date 2018-04-22 23:23:31
 **/

public class ResultException extends RuntimeException{

    private int errorCode;

    public ResultException(int errorCode) {
        this.errorCode = errorCode;
    }

    public ResultException(String message, int errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

    public ResultException(String message, Throwable cause, int errorCode) {
        super(message, cause);
        this.errorCode = errorCode;
    }

    public ResultException(Throwable cause, int errorCode) {
        super(cause);
        this.errorCode = errorCode;
    }

    public ResultException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace, int errorCode) {
        super(message, cause, enableSuppression, writableStackTrace);
        this.errorCode = errorCode;
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

}
